MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct',
          'Nov', 'Dec']


class Calendar(object):

    WEEKS_PER_MONTH = 4
    WEEKS_PER_YEAR = WEEKS_PER_MONTH * len(MONTHS)
    
    def __init__(self, start_week=1, start_year=2010):
        self.week = start_week
        self.year = start_year
        
    def advance_week(self):
        self.week += 1
        if self.week > Calendar.WEEKS_PER_YEAR:
            self.week = 1
            self.year += 1

    def get_month(self):
        return self.week / Calendar.WEEKS_PER_MONTH

    month = property(get_month)

    def get_week_in_month(self):
        return (self.week % Calendar.WEEKS_PER_MONTH) + 1
    
    week_in_month = property(get_week_in_month)

    def __str__(self):
        return 'Week %d, %d' % (self.week, self.year)
